//
//  CKXTableVIewCell.m
//  GameBaby
//
//  Created by keyZhang on 14-2-13.
//  Copyright (c) 2014年 keyZhang. All rights reserved.
//

#import "CKXTableVIewCell.h"

@implementation CKXTableVIewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)copyBtnClick:(UIButton *)sender {
    UIPasteboard *appPasteBoard =  [UIPasteboard generalPasteboard];
    appPasteBoard.persistent = YES;
    NSString *pasteStr =self.kaDetailLabel.text;
    [appPasteBoard setString:pasteStr];
    
    UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"完成复制",nil),nil] message:pasteStr delegate:nil cancelButtonTitle:NSLocalizedString(@"OK",nil) otherButtonTitles:nil];
    [alertview show];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.kaTitleLabel.text = self.model.name;
    self.kaDetailLabel.text = self.model.card;
    self.timeLabel.text = [NSString stringWithFormat:@"%@领取",self.model.time];
}

@end
